#!/bin/sh
echo ------- uploading API and IDE jars

apijar=`ls API/target/sikulixapi*complete.jar`
cp $apijar pages/sikulixapi-2.1.0.jar

apisrcjar=`ls API/target/sikulixapi*sources.jar`
cp $apisrcjar pages/sikulixapi-2.1.0-sources.jar

idejar=`ls IDE/target/sikulixide*complete.jar`
cp $idejar pages/sikulix-2.1.0.jar

echo ------ updating downloads page

jar=`ls API/target/sikulixapi*complete.jar`
build=`java -jar $apijar buildDate`

echo "s/##sikulixapiide##/$build/" >sedcommand
echo "s/##TRAVIS_BUILD_NUMBER##/$TRAVIS_BUILD_NUMBER/" >>sedcommand
cat sedcommand

sed -f sedcommand pages/nightly_template.html >pages/nightly.html

